/**
 * 
 */
package com.gragra.evaluateNouns;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import com.gragra.parseOptions.CommandLineException;
import com.gragra.parseOptions.Parser;
/**
 * @author a2
 * 27.05.2013
 */
public class AnnotateCorpusFramesExtending
{
	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException
	{
		Parser ps = new Parser();
		ps.setMinArgs(2);
		ps.setMaxArgs(2);
		ps.setArgumentDescription(0, "the input file that will be used");
		ps.setArgumentDescription(1, "the output file that will be used");
		ps.setProgramDescription("This program is a simple implementation of an unsupervised way of finding nouns.");
		EvaluateNounsWithMapping main = new EvaluateNounsExtending();
		try
		{main.addNoRelevantOptions(ps);}
		catch(CommandLineException e)
		{
			System.out.println("initialization error:");
			e.printStackTrace();
			System.exit(-1);
		}
		try
		{ps.parse(args);}
		catch(CommandLineException e)
		{
			e.printStackTrace();
			System.out.println(ps.writeOutHelp());
			System.exit(-1);
		}
		if(ps.hadHelp())
		{
			System.out.println(ps.writeOutHelp());
			System.exit(0);
		}
		BufferedReader br = new BufferedReader(ps.getFileReaderFromArgument(0));
		BufferedWriter bw = new BufferedWriter(ps.getFileWriterFromArgument(1));
		main.annotateCorpusFrames(ps, br, bw);
		br.close();
		bw.close();
	}
}
